import { DataTypes } from 'sequelize';
import { Migration } from '../umzug';

export const up: Migration = async ({ context: sequelize }) => {
  await sequelize.getQueryInterface().createTable('sms_verifications', {
    id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
    tel: { type: DataTypes.STRING(11) },
    vertication_code: { type: DataTypes.STRING(6) },
    created_at: { type: DataTypes.DATE },
    updated_at: { type: DataTypes.DATE },
  });
};

export const down: Migration = async ({ context: sequelize }) => {
  await sequelize.getQueryInterface().dropTable('sms_verifications');
};
